<template>
  <div>
    <div>{{ modelValue }}</div>
    <button @click="handleClick">修改 modelValue</button>
    <button @click="$emit('update:age', 20)">修改 age</button>
  </div>
</template>

<script>
export default {
  props: ['modelValue'],
  emits: ['update:modelValue', 'update:age'],
  setup(props, { emit }) {
    const handleClick = () => {
      emit('update:modelValue', 10)
    }
    return {
      handleClick,
    }
  },
}
</script>
